﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using System.Data;

namespace Bluebunnie
{
    /// <summary>
    /// Interaction logic for DataPelanggan.xaml
    /// </summary>
    public partial class DataPelanggan : UserControl
    {
        public DataPelanggan()
        {
            InitializeComponent();

            DataView dv = new DataView();
            dv.Table = DataManager.GetData("select * from tbl_customer");

            this.DataContext = dv;
        }

        private void btnTambah_Click(object sender, RoutedEventArgs e)
        {
            Shell.Current.Show("Tambah Customer", new DataPelangganEdit());
            //new DataPelangganTambah().ShowDialog();
        }

        private void btnEditData_Click(object sender, RoutedEventArgs e)
        {
            Shell.Current.Show("Tambah Customer", new DataPelanggan());
            //new DataPelangganEdit().ShowDialog();
        }

        private void btnKeluar_Click(object sender, RoutedEventArgs e)
        {
            Shell.Current.Close("Data Pelanggan");
        }


    }
}
